var m = Object.defineProperty;
var v = (e, t, i) => t in e ? m(e, t, {
  enumerable: !0,
  configurable: !0,
  writable: !0,
  value: i
}) : e[t] = i;
var a = (e, t, i) => (v(e, typeof t != "symbol" ? t + "" : t, i),
  i);
import { V as d, d0 as c, O as f, C as _, n as b } from "./index-9e4bc268.js";
var g = Object.defineProperty
  , h = Object.getOwnPropertyDescriptor
  , p = (e, t, i, n) => {
    for (var o = n > 1 ? void 0 : n ? h(t, i) : t, s = e.length - 1, l; s >= 0; s--)
      (l = e[s]) && (o = (n ? l(t, i, o) : l(o)) || o);
    return n && o && g(t, i, o),
      o
  }
  ;
let r = class extends d {
  constructor() {
    super(...arguments);
    a(this, "dialogVisible", !1);
    a(this, "newDialogVisible", !1)
  }
  handleOpenConfirmDialog() {
    const t = c.confirm({
      title: "函数式触发",
      content: "这是一个函数式触发的对话框",
      onClose: () => {
        f.info("关闭了对话框")
      }
      ,
      onConfirm: () => {
        c.close(t),
          f.success("点击了对话框确认")
      }
    })
  }
}
  ;
r = p([_], r);
var D = function () {
  var e = this
    , t = e.$createElement
    , i = e._self._c || t;
  return i("div", {
    staticClass: "default-dialog"
  }, [i("s-flex", {
    attrs: {
      gap: "1.2rem"
    }
  }, [i("s-button", {
    attrs: {
      theme: "primary"
    },
    on: {
      click: function (n) {
        e.dialogVisible = !0
      }
    }
  }, [e._v("打开对话框")]), i("s-button", {
    attrs: {
      theme: "primary"
    },
    on: {
      click: e.handleOpenConfirmDialog
    }
  }, [e._v("函数式确认框")])], 1), i("s-dialog", {
    attrs: {
      visible: e.dialogVisible,
      width: "32%",
      height: "32%",
      center: ""
    },
    on: {
      "update:visible": function (n) {
        e.dialogVisible = n
      }
    }
  }, [i("div", {
    staticStyle: {
      width: "100%",
      height: "100%",
      display: "flex",
      "justify-content": "center",
      "align-items": "center",
      gap: "4rem"
    }
  }, [i("s-button", {
    attrs: {
      theme: "primary"
    },
    on: {
      click: function (n) {
        e.dialogVisible = !1
      }
    }
  }, [e._v("关闭对话框")]), i("s-button", {
    attrs: {
      theme: "primary"
    },
    on: {
      click: function (n) {
        e.newDialogVisible = !0
      }
    }
  }, [e._v("打开新的对话框")])], 1)]), i("s-dialog", {
    attrs: {
      visible: e.newDialogVisible,
      width: "30rem",
      height: "20rem",
      header: "",
      title: "新的对话框",
      footer: "",
      body: "这是一个新的对话框的内容",
      "confirm-button": {
        theme: "success",
        text: "关闭"
      },
      "without-close-button": ""
    },
    on: {
      "update:visible": function (n) {
        e.newDialogVisible = n
      },
      confirm: function (n) {
        e.newDialogVisible = !1
      }
    }
  })], 1)
}
  , V = [];
const u = {};
var w = b(r, D, V, !1, y, null, null, null);
function y(e) {
  for (let t in u)
    this[t] = u[t]
}
const O = function () {
  return w.exports
}();
export { O as default };
